/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.boxin.ims.modules.momarketing.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.validator.constraints.Length;

import com.boxin.ims.modules.momarketing.entity.self.OnlineSignupConfigDetail;
import com.thinkgem.jeesite.common.persistence.BaseEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * 在线预约Entity
 * @author Jakemanse
 * @version 2013-09-10
 */
@Entity
@Table(name = "ims_online_signup_config")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OnlineSignupConfig extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private Long id; 		// 编号
	
	private User user; 		// 用户
	private String name; 	// 自定义的在线预约名称
	private String mailFlag = YES;	//是否需要填写邮箱
	private String nameFlag = YES;	//是否需要填写名字
	private String idnoFlag = NO;	//是否需要填写身份证号
	private String descFlag = NO;	//是否需要填写描述
	private String mobileFlag = YES;	//是否需要填写手机号
	private String qqFlag = NO;		//是否需要填写QQ
	
	private Date startTime;	//开始时间
	private Date endTime;	//结束时间
	
	private String remarks; // 备注
	private Date createTime;	// 创建日期
	private String delFlag;	// 删除标记（0：正常；1：删除）
	private String selfDefine;  //用户自定义功能
	private String content ; //商家自定义展示
	
	
	
	
	@Transient
	private List<OnlineSignupConfigDetail> onlineSignupConfigDetailsList ;
	
	
	
	
	
	
	@Transient
	public List<OnlineSignupConfigDetail> getOnlineSignupConfigDetailsList() {
		return onlineSignupConfigDetailsList;
	}



	public void setOnlineSignupConfigDetailsList(
			List<OnlineSignupConfigDetail> onlineSignupConfigDetailsList) {
		this.onlineSignupConfigDetailsList = onlineSignupConfigDetailsList;
	}



	public OnlineSignupConfig() {
		this.createTime = new Date();
		this.startTime = new Date();
		this.endTime = new Date();
		
		this.delFlag = DEL_FLAG_NORMAL;
	}

	

	public OnlineSignupConfig(Long id){
		this();
		this.id = id;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	//@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_momarketing_onlineSignupConfig")
	//@SequenceGenerator(name = "seq_momarketing_onlineSignupConfig", sequenceName = "seq_momarketing_onlineSignupConfig")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name="user_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=1, max=200)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min=0, max=255)
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	

	@Length(min=1, max=1)
	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getMailFlag() {
		return mailFlag;
	}

	public void setMailFlag(String mailFlag) {
		this.mailFlag = mailFlag;
	}

	public String getNameFlag() {
		return nameFlag;
	}

	public void setNameFlag(String nameFlag) {
		this.nameFlag = nameFlag;
	}

	public String getDescFlag() {
		return descFlag;
	}

	public void setDescFlag(String descFlag) {
		this.descFlag = descFlag;
	}

	public String getMobileFlag() {
		return mobileFlag;
	}

	public void setMobileFlag(String mobileFlag) {
		this.mobileFlag = mobileFlag;
	}

	public String getQqFlag() {
		return qqFlag;
	}

	public void setQqFlag(String qqFlag) {
		this.qqFlag = qqFlag;
	}

	public String getIdnoFlag() {
		return idnoFlag;
	}

	public void setIdnoFlag(String idnoFlag) {
		this.idnoFlag = idnoFlag;
	}

	public String getSelfDefine() {
		return selfDefine;
	}

	public void setSelfDefine(String selfDefine) {
		this.selfDefine = selfDefine;
	}



	public String getContent() {
		return content;
	}



	public void setContent(String content) {
		this.content = content;
	}



	



	
	
	
	
}


